import request from '@/utils/request'
export function fetchTagAll(query) {
  return request({
    url: '/admin/tag-all',
    method: 'get',
    params: query
  })
}

export function fetchList(query) {
  return request({
    url: '/admin/tag',
    method: 'get',
    params: query
  })
}

export function fetchShow(id) {
  return request({
    url: '/admin/tag/' + id,
    method: 'get',
    params: { id }
  })
}

export function fetchStore(data) {
  return request({
    url: '/admin/tag',
    method: 'post',
    data
  })
}

export function fetchUpdate(id, data) {
  return request({
    url: '/admin/tag/' + id,
    method: 'put',
    data
  })
}

export function fetchDelete(id) {
  return request({
    url: '/admin/tag/' + id,
    method: 'delete'
  })
}

export function fetchBatchDelete(data) {
  return request({
    url: '/admin/tag/0',
    method: 'delete',
    data
  })
}